#define _CRT_SECURE_NO_WARNINGS
#include"SList.h"

void TestSList1()
{
	SListNode* plist = NULL;
	SListPushBack(&plist, 1);
	SListPushBack(&plist, 2);
	SListPushBack(&plist, 3);
	SListPushBack(&plist, 4);
	SListPushBack(&plist, 5);
	SListPushFront(&plist, 0);
	SListPopBack(&plist);
	SListPopFront(&plist);
	SListPrint(plist);
	SListNode* pos = SListFind(plist, 2);
	if (pos)
	{
		printf("%d\n", pos->data);
	}
	else
	{
		printf("NULL\n");
	}
	SListInsertAfter(pos, 5);
	SListPrint(plist);
	SListNode* cur = SListFind(plist, 1);
	SListEraseAfter(cur);
	SListPrint(plist);
	SListDestroy(plist);
}

int main()
{
	TestSList1();
	return 0;
}